home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Tools & Utilities
/
Collection of Tools and Utilities.iso
/
dskut
/
cdump142.zip
/
DUMP.DOC
next >
Wrap
Text File
|
1990-12-18
|
9KB
|
173 lines
Cos File Dump Utility version 1.42c (C)opyright 1990 Ofer Inbar
A summary of these instructions is displayed on the screen if you run Dump
without any command line parameters. Dump requires a filespec to run.
Syntax:
DUMP [ {/|-} option ] filespec [ {/|-} option ]
Filespec is any legal DOS file specification, which can include a drive name
and path name when necessary. The option may appear before or after filespec,
but not both. It can be preceeded by either a slash or a dash, and is not
case sensitive. It is not necessary to separate the filespec from the option
by a space. For example, all of the following Dump commands are equivalent:
DUMP FILE.BIN/T DUMP /tFILE.BIN
DUMP FILE.BIN /t DUMP -T FILE.BIN
DUMP FILE.BIN -t DUMP -tFILE.BIN
DUMP FILE.BIN-T DUMP /T FILE.BIN
Action:
Dumps the specified file (filespec) to the standard output device. This is
usually the screen, but can be redirected. Any legal DOS pathname may be
used for the file, but no wildcards are allowed. Dump can use a variety of
formats for diplaying the contents of the file. You choose a Dump format by
specifying one of the options described below. While Dump is running, you
may pause it by hitting any key (except <Shft>, <Alt>, <Ctrl>, ...). Hitting
a key again will resume dumping. You can abort and return to DOS at any time
by hitting the <ESC> key.
Options: (D is the default format)
D or d Dump - Debug's memory dump format; 16 bytes/line
This is the default format, and will be used when no option is specified.
This format looks like the output of Debug's D command, except that file
offsets are used instead of addresses. Each line begins with an offset,
then lists 16 bytes in hex format, with spaces separating. There is a dash
between the eighth and ninth bytes. At the end of the line is an ASCII
interpretation of those 16 bytes, in 16 characters. Most graphics chars
are displayed, but some control characters are replaced by dots. This is
the only significant departure from Debug, which replaces all control,
graphics, and foreign characters by periods.
Here is a sample line in /D format:
8B0: 51 42 50 04 01 00 02 00 - 01 00 00 00 01 00 04 49 QBP·· · · · ·O
W or w Wide - 32 bytes/line, requires 132 columns
This option produces output very similar to /D, except that 32 bytes are shown
on each line, both in hex and ASCII. This option produces 132 column wide
output. If your screen is only 80 columns wide, the lines will be divided and
hard to read. The most common use for wide output is to redirect it to a wide
carriage printer. If your printer is 80 columns, you can usually set it to
compressed text mode and it will print 132 columns. Check the printer manual.
H or h Hex - 24 bytes/line, hex representation only
This format displays only hex, like the middle part of the screen in the /D
format. Using the extra text columns at the right edge of the screen, it
shows an additional 8 bytes on each line, for a total of 24 bytes in 80
columns.
A or a ASCII - 80 chars/line, ctrl chars as periods
This format is similar to the format at the right edge of the screen in /D.
The entire file is shown only as ASCII, using the full 80 columns. This means
that 80 bytes are shown on each line, making this the most compact format.
/A interprets characters exactly like /D - most graphics characters are shown,
but some control characters are displayed as periods. Null bytes (0) are
shown as spaces.
T or t Text - strips off all binary characters
This format interprets the file as ASCII, and ignores all non-text characters.
Characters with ASCII codes 9-10, 12-13, 32 - 127 are considered normal text
characters and are not ignored. All special characters are treated normally.
I.e. TAB (9) moves the cursor eight spaces, and CR (13) starts a new line.
The exception is that FF (12) is shown on screen as a Venus symbol (mirror),
although it acts normally on the printer (issues a form feed, or page break).
Thus, using this format on a text file will have the same effect as DOS's TYPE
command. But, unlike TYPE, DUMP /T will not stop at an EOF character (26).
Since DUMP /T will ignore non-text characters, it can be used as an ASCII
"stripper." It will show all the text in a binary file, and this output can
be redirected to another file. This can be useful, for example, if a word
processor document is damaged and the word processor cannot open the file.
Use DUMP /T to extract the text from the document into a new ASCII file, and
import the file into your word processor. You will lose all formatting, but
you should be able to recover most of the text this way. Another use of this
ASCII stripping capability is to get all of the messages from a program's .EXE
file. Also, since DUMP will issue a CR (13) when it encounters and LF (10),
it can be used to translate a Unix format text file to MS-DOS format.
Examples:
The following examples illustrate how to use Dump. Each example starts with a
sample command line, and then describes what that command does.
DUMP file.dat
Dumps file.dat to the screen in the default format (/D).
DUMP file.exe/T >file.txt
All text that is in file.exe is copied into file.txt. File.txt now contains
all of the text strings and messages stored in the program file.exe.
Note the use of the DOS redirection character (>) to redirect standard output
to a file. Also note that a space is not needed between the filename and the
option switch.
DUMP -w file.bin >prn
This dumps file.bin, a binary file, in 132 column format, showing 32 bytes on
each line. The redirection character is used to redirect output to the first
printer (PRN). Note that although a space is not required between the option
and the filename, one is included for clarity. You can achieve the same
result by typing DUMP -WFILE.BIN>PRN
Here is a list of the DOS devices you may want to use for redirecting output.
LPT1: Line PrinTer 1 First parallel printer
LPT2: Line PrinTer 2 Second parallel printer
LPT3: Line PrinTer 3 Third parallel printer
COM1: COMmunications port 1 First serial port; modem or serial printer
COM2: COMmunications port 2 Second serial port; modem or serial printer
COM3: COMmunications port 3 Third serial port; modem or serial printer
COM4: COMmunications port 4 Fourth serial port; modem or serial printer
PRN: PRiNter Synonym for LPT1:
AUX: AUXilliary Synonym for COM1:
CON: CONsole Screen (for output), the default STDOUT device.
NUL: NULl device "Bit bucket"; all output discarded
*CLOCK CLOCK DOS system clock; do not use this one.
Errors:
This section describes the causes and meanings of the error messages that
Dump reports when something is wrong.
DUMP: No filename specified
You specified an option switch on the Dump command line, but gave no filename.
For example: DUMP /A
DUMP: Unrecognized option: letter
You used the option switch character (/ or -) but the following character was
not one of the five format letters Dump recognizes (D, W, H, A, or T).
For example: DUMP file.ext -R
Dump responds: DUMP: Unrecognized option: R
DUMP: Cannot open file: filename
Dump encountered an error trying to open the file. There are several possible
causes for this:
A) There is damage on the area of the disk the file or its directory occupies.
B) The file has been opened by another program with the DENY WRITE attribute.
C) There are not enough file handles. Check the "FILES=" line in CONFIG.SYS.
D) The file doesn't exist and the directory is full (applies to root dir only).
DUMP: File not found: filename
There was no file with the name you specified. If the file you specify
does exist but is zero length, Dump deletes it and gives this error.
DUMP: Disk error reading file at offset: address
A disk read error occurred while trying to read the file. The addre